<template>
  <div class="home">
    <TopMenu></TopMenu>
    <div class="image-with-text">
      <img id="image1" src="@/assets/images/image_Home1.png" />
      <div class="text-overlay">
        <h1>碳核算与碳交易网</h1>
      </div>
    </div>
    <div class="content1">
      <div>
        <h1>我们的优势</h1>
      </div>
      <div>
        <h2 style="color: darkgray">Advantage</h2>
      </div>
    </div>
    <div class="container clearfix" style="margin-top: 2%; max-height: 250px; max-width: 1100px;margin-left: 12%">
      <el-space :size="200">
        <div class="image-container">
          <img src="@/assets/images/image_Home2.png" />
          <h2>开放平台，促进合作</h2>
        </div>
        <div class="image-container">
          <img src="@/assets/images/image_Home3.png" />
          <h2>足不出户，线上交易</h2>
        </div>
        <div class="image-container">
          <img src="@/assets/images/image_Home4.png" />
          <h2>专业平台，可靠保证</h2>
        </div>
      </el-space>

    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const count = ref(0)

function increment() {
  count.value++
}
</script>

<script lang="ts">
import TopMenu from '@/components/Menu/TopMenu.vue'

export default {
  components: {
    TopMenu
  }
}
</script>

<style scoped>
.home {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#image1 {
  width: 100%;
  margin-top: -1%;
  height: 200px;
}

.container {
  width: 90%;
  margin: 90px;
}

.image-container {
  float: left;
  width: 30%;
}

.image-container img {
  width: 100%;
  max-height: 240px;
}

.image-container h2 {
  margin-bottom: 10px;
  text-align: center;
}

.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

.image-with-text {
  position: relative;
  display: inline-block;
  height: 400px;
  width: 100%;
}

.image-with-text .text-overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(149, 181, 21);
  padding: 10px;
  letter-spacing: 7px;
  text-align: center;
}

.content1 {
  height: 100px;
  margin-top: 1%;
  text-align: center;
}
</style>
